﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coolzon.Common
{
    public class ServiceResult<T>
    {
        public T Data { get; set; }
        public bool IsSuccess { get; set; }
        public string Message { get; set; }
        public int ErrorCode { get; set; }

        public ServiceResult()
        {

        }

        public ServiceResult(T data)
        {
            IsSuccess = true;
            ErrorCode = 0;
            Message = string.Empty;
            Data = data;
        }

        public ServiceResult(bool isSuccess, int errorCode, string message)
        {
            IsSuccess = isSuccess;
            ErrorCode = errorCode;
            Message = message;
        }
    }
}
